﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_Flow_GetStepRule]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_Flow_GetStepRule];
GO
--select * from v_uds_flow_staff_in_step
CREATE PROCEDURE [dbo].[sproc_Flow_GetStepRule]
    @FlowID int,
    @StepID    int
AS
DECLARE @StepRule int

SET     @StepRule    = -1
SELECT     @StepRule    = Flow_Rule
    FROM
        uds_flow_step
    WHERE
        flow_id     = @FlowID
        and step_id     = @StepID
        
RETURN  @StepRule